package com.ayou.eggguard.farm.controller;

import com.ayou.common.utils.Result;
import com.ayou.eggguard.farm.pojo.CoopEnvironmentInfo;
import com.ayou.eggguard.farm.service.EnvironmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/environment")
public class EnvironmentController {

    @Autowired
    private EnvironmentService environmentService;
    @GetMapping("/getCoopEnvi")
    public Result<CoopEnvironmentInfo> getCoopEnvironment(String coopNumber){
        CoopEnvironmentInfo info=environmentService.getCoopEnvironment(coopNumber);
        return Result.success(info);
    }

}
